<div class="wrapper-md ng-scope">
<div class="row" novalidate>

    <div class="panel panel-default">
      <tabset class="tab-container" >

        <tab heading="系统列表" ng-click="cancel()" active="status.active">
          <div class="row wrapper" >
            <div class="col-sm-4 m-b-xs">
              <input type="text" class="form-control" ng-model="searchform.label" placeholder="系统名称">
            </div>
            <button class="btn m-b-xs w-xs btn-success" ng-click="search()">搜索</button>
          </div>

          <div class="panel-body">
            <table class="table table-striped table-bordered dataTable" style="width: 100%">
              <thead>
                <tr>
                  <th style="width: 13%;text-align:center">系统名称</th>
                  <th style="width: 10%;text-align:center">系统别名</th>
                  <th style="width: 8%;text-align:center">系统编号</th>
                  <th style="width: 6%;text-align:center">排序</th>
                  <th style="width: 6%;text-align:center">备注</th>
                  <th style="width: 7%;text-align:center">操作</th>
                </tr>
              </thead>
              <tbody>
                <tr ng-repeat="system in system_list">
                  <td class="text-center">{{system.system_name}}</td>
                  <td class="text-center">{{system.system_alias}}</td>
                  <td class="text-center">{{system.system_code}}</td>
                  <td class="text-center">{{system.system_sort}}</td>
                  <td class="text-center">{{system.system_remark}}</td>
                  <td>
                    <button type="button" class="btn btn-info btn-xs" ng-click="update(system)">修改</button>
                    <button type="button" class="btn btn-danger btn-xs" ng-click="delete($index)">删除</button>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
          <div class="text-right" style="background-color: white">
            <pagination total-items="totalItems" ng-model="currentPage" ng-change="search(currentPage)" previous-text="上一页"
                next-text="下一页" first-text="首页" last-text="尾页" max-size="5" boundary-links="true" rotate="false"
                items-per-page="itemsPerPage" class="m-t-none m-b"></pagination>
          </div>
        </tab>

        <tab heading="{{tabname.name}}" ng-click="add()" active="tabname.active">
          <div class="panel-body">
            <form name="form" class="form-horizontal form-validation ng-pristine ng-valid ng-valid-required">
              <div class="form-group">
                <label class="col-lg-2 control-label">系统名称:</label>
                <div class="col-lg-4">
                  <input type="text" class="form-control" placeholder="必填" ng-model="obj.system_name">
                </div>
              </div>
              <div class="form-group">
                <label class="col-lg-2 control-label">系统别名:</label>
                <div class="col-lg-4">
                  <input type="text" class="form-control" ng-model="obj.system_alias">
                </div>
                <label class="control-label text-muted">系统简称,用于在右上角系统切换使用</label>
              </div>
              <div class="form-group" ng-if="!status.addsystem">
                <label class="col-lg-2 control-label">系统编号:</label>
                <div class="col-lg-4">
                  <input type="text" class="form-control" ng-model="obj.system_code" ng-disabled="true">
                </div>
              </div>
              <div class="form-group" ng-if="!status.addsystem">
                <label class="col-lg-2 control-label">是否启用:</label>
                <div class="col-lg-1">
                  <label class="i-switch m-t-xs m-r">
                    <input type="checkbox" ng-true-value="'1'" ng-false-value="'0'" ng-model="obj.system_start_flag"><i></i>
                  </label>
                </div>
                <label class="control-label text-muted">停用后,所有账号无法查看此系统内菜单</label>
              </div>
              <div class="form-group">
                <label class="col-lg-2 control-label">排序:</label>
                <div class="col-lg-4">
                  <input type="number" class="form-control" ng-model="obj.system_sort">
                </div>
              </div>
              <div class="form-group">
                <label class="col-lg-2 control-label">备注:</label>
                <div class="col-lg-4">
                  <textarea id="remarks" class="form-control" rows="3" ng-model="obj.system_remark"></textarea>
                </div>
              </div>
              <div class="form-group" ng-if="!status.addsystem">
                <label class="col-lg-2 control-label">创建账号:</label>
                <b class="col-lg-1 control-label text-left">{{obj.create_by}}</b>
                <label class="col-lg-1 control-label">创建时间:</label>
                <b class="col-lg-2 control-label text-left">{{obj.create_time}}</b>
              </div>
            </form>
            <div class="col-lg-2"></div>
            <div class="col-lg-3">
              <button class="btn btn-primary btn-rounded" ng-click="save()">保存</button>
              <button class="btn btn-default btn-rounded" ng-click="cancel()">取消</button>
            </div>
          </div>
        </tab>


      </tabset>

      
      

      



    </div>

</div>
</div>


